package org.genntii.smuserserver.client;

import org.genntii.smcommon.result.Result;
import org.genntii.smdomain.entity.Comment;
import org.genntii.smdomain.vo.CommentClientVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;

@FeignClient("sm-comment")
public interface CommentClient {

    @GetMapping("/comment/getByUser/{userId}")
    Result<ArrayList<CommentClientVO>> getCommentByUserId(@PathVariable Long userId);

    @GetMapping("/comment/commentLimit")
    Result<ArrayList<CommentClientVO>> getCommentLimit(@RequestParam("userId")Long userId,
                                                      @RequestParam("pageNum") Integer pageNum,
                                                      @RequestParam("pageSize") Integer pageSize);

    @GetMapping("/comment/userTotal/{userId}")
    public Result<Long> getTotal(@PathVariable Long userId);

}
